<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>1.2 门电路与运算 | pansis.io</title>
<link rel="shortcut icon" href="https://github.pansis.site/favicon.ico">
<link href="https://github.pansis.site/styles/main.css" rel="stylesheet">
<link href="//at.alicdn.com/t/c/font_1678829_b85ccgkdqkr.css" rel="stylesheet">
<link href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css" rel="stylesheet">
<link rel="alternate" type="application/rss+xml" title="pansis.io » Feed" href="https://github.pansis.site/atom.xml">
        <meta name="description" content="一、逻辑运算
1、与 AND
表达式：F=AB=A⋅BF=AB=A·BF=AB=A⋅B
真值表：

逻辑符号：

2、或 OR
表达式：F=A+BF=A+BF=A+B
真值表：

逻辑符号：

3、非
表达式：F=A‾=A‘F=\overl..." />
        <meta name="keywords" content="计算机组成原理" />
        <!-- OG -->
        <meta property="og:locale" content="zh_CN">
        <meta property="og:title" content="1.2 门电路与运算" />
        <meta property="og:type" content="article" />
        <meta property="og:description" content="一、逻辑运算
1、与 AND
表达式：F=AB=A⋅BF=AB=A·BF=AB=A⋅B
真值表：

逻辑符号：

2、或 OR
表达式：F=A+BF=A+BF=A+B
真值表：

逻辑符号：

3、非
表达式：F=A‾=A‘F=\overl...">
        <meta property="og:url" content="https://github.pansis.site/post/1.2 门电路与运算/" />
        <meta property="og:site_name" content="pansis.io">
        <meta property="og:updated_time" content="2024-03-11">
        <meta property="og:image" content="" />
        <meta property="og:image:secure_url" content="">
        <meta property="og:image:alt" content="1.2 门电路与运算">
        <!-- Twitter (post.ejs) -->
        <meta name="twitter:card" content="summary_large_image">
        <meta name="twitter:title" content="1.2 门电路与运算">
        <meta name="twitter:description" content="一、逻辑运算
1、与 AND
表达式：F=AB=A⋅BF=AB=A·BF=AB=A⋅B
真值表：

逻辑符号：

2、或 OR
表达式：F=A+BF=A+BF=A+B
真值表：

逻辑符号：

3、非
表达式：F=A‾=A‘F=\overl...">
        <!-- <meta name="twitter:site" content="@WBoy0609">
        <meta name="twitter:creator" content="@WBoy0609"> -->
        <meta name="twitter:image" content="">
</head>

<body>
    <div class="main animated">
        <div class="header animated fadeInDown">
    <div class="site_title_container">
        <div class="site_title">
            <a href="https://github.pansis.site">pansis.io</a>
        </div>
    </div>
    <div class="my_socials">
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
        <a href="https://github.pansis.site/atom.xml" title="rss" target="_blank"><i class="iconfont icon-rss"></i></a>
    </div>
</div>

    <div class="header_menu">
        
            
                <a href="/" class="menu">首页</a>
            
        
            
                <a href="/tag/GWAaV2nvk/" class="menu">程序设计课程</a>
            
        
            
                <a href="/tag/24hangc" class="menu">比赛</a>
            
        
            
                <a href="/tag/L7r9STb75/" class="menu">Python教程</a>
            
        
            
                <a href="/tags" class="menu">分类</a>
            
        
        <div class="gridea-search-div">
            <form id="gridea-search-form" action="https://github.pansis.site/search/">
                <input class="gridea-search-input" autocomplete="off" spellcheck="false" name="q"/>
            </form>
        </div>
    </div>

            <div class="autopagerize_page_element">
                <div class="content">
                    <div class="post_page">
                        <div class="post animated fadeInDown">
                            <div class="post_title post_detail_title">
                                <h2>
                                    1.2 门电路与运算
                                </h2>
                                <span class="article-info">
                                    2024-03-11, 345 words, 2 min read
                                </span>
                            </div>
                            <div class="post_content markdown">
                                <p class="md_block">
                                    <span class="md_line md_line_start md_line_end">
                                        <h2 id="一-逻辑运算">一、逻辑运算</h2>
<h4 id="1-与-and">1、与 AND</h4>
<p>表达式：<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>F</mi><mo>=</mo><mi>A</mi><mi>B</mi><mo>=</mo><mi>A</mi><mo separator="true">⋅</mo><mi>B</mi></mrow><annotation encoding="application/x-tex">F=AB=A·B</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.13889em;">F</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault">A</span><span class="mord mathdefault" style="margin-right:0.05017em;">B</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault">A</span><span class="mpunct">⋅</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord mathdefault" style="margin-right:0.05017em;">B</span></span></span></span></p>
<p>真值表：</p>
<img src="http://cos.pansis.site/202309111102391.png" alt="image-20230911110208362" style="zoom: 50%;" />
<p>逻辑符号：</p>
<img src="http://cos.pansis.site/202309111101362.png" alt="image-20230911110157322" style="zoom:33%;" />
<h4 id="2-或-or">2、或 OR</h4>
<p>表达式：<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>F</mi><mo>=</mo><mi>A</mi><mo>+</mo><mi>B</mi></mrow><annotation encoding="application/x-tex">F=A+B</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.13889em;">F</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.76666em;vertical-align:-0.08333em;"></span><span class="mord mathdefault">A</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span></span><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.05017em;">B</span></span></span></span></p>
<p>真值表：</p>
<img src="http://cos.pansis.site/202309111102007.png" alt="image-20230911110256977" style="zoom:50%;" />
<p>逻辑符号：</p>
<img src="http://cos.pansis.site/202309111103076.png" alt="image-20230911110315045" style="zoom:33%;" />
<h4 id="3-非">3、非</h4>
<p>表达式：<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>F</mi><mo>=</mo><mover accent="true"><mi>A</mi><mo stretchy="true">‾</mo></mover><mo>=</mo><msup><mi>A</mi><mi mathvariant="normal">‘</mi></msup></mrow><annotation encoding="application/x-tex">F=\overline{A}=A^`</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.13889em;">F</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.8833300000000001em;vertical-align:0em;"></span><span class="mord overline"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8833300000000001em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathdefault">A</span></span></span><span style="top:-3.80333em;"><span class="pstrut" style="height:3em;"></span><span class="overline-line" style="border-bottom-width:0.04em;"></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.849108em;vertical-align:0em;"></span><span class="mord"><span class="mord mathdefault">A</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.849108em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">‘</span></span></span></span></span></span></span></span></span></span></span></p>
<p>真值表：</p>
<img src="http://cos.pansis.site/202309111103497.png" alt="image-20230911110334470" style="zoom:50%;" />
<p>逻辑符号：</p>
<img src="http://cos.pansis.site/202309111103478.png" alt="image-20230911110339455" style="zoom:33%;" />
<h4 id="4-与非nand">4、与非NAND</h4>
<p>表达式：<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>Z</mi><mo>=</mo><mover accent="true"><mrow><mi>X</mi><mi>Y</mi></mrow><mo stretchy="true">‾</mo></mover></mrow><annotation encoding="application/x-tex">Z=\overline{XY}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.07153em;">Z</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.8833300000000001em;vertical-align:0em;"></span><span class="mord overline"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8833300000000001em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathdefault" style="margin-right:0.07847em;">X</span><span class="mord mathdefault" style="margin-right:0.22222em;">Y</span></span></span><span style="top:-3.80333em;"><span class="pstrut" style="height:3em;"></span><span class="overline-line" style="border-bottom-width:0.04em;"></span></span></span></span></span></span></span></span></span></p>
<p>真值表：</p>
<img src="http://cos.pansis.site/202309111105998.png" alt="image-20230911110511959" style="zoom:50%;" />
<p>逻辑符号：</p>
<img src="http://cos.pansis.site/202309111105353.png" alt="image-20230911110533330" style="zoom:33%;" />
<h4 id="5-或非-nor">5、或非 NOR</h4>
<p>表达式：<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>Z</mi><mo>=</mo><mover accent="true"><mrow><mi>X</mi><mo>+</mo><mi>Y</mi></mrow><mo stretchy="true">‾</mo></mover></mrow><annotation encoding="application/x-tex">Z=\overline{X+Y}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.07153em;">Z</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.9666600000000001em;vertical-align:-0.08333em;"></span><span class="mord overline"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8833300000000001em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathdefault" style="margin-right:0.07847em;">X</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord mathdefault" style="margin-right:0.22222em;">Y</span></span></span><span style="top:-3.80333em;"><span class="pstrut" style="height:3em;"></span><span class="overline-line" style="border-bottom-width:0.04em;"></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.08333em;"><span></span></span></span></span></span></span></span></span></p>
<p>真值表：</p>
<img src="http://cos.pansis.site/202309111106241.png" alt="image-20230911110634218" style="zoom:50%;" />
<p>逻辑符号：</p>
<img src="http://cos.pansis.site/202309111106848.png" alt="image-20230911110656821" style="zoom:33%;" />
<h4 id="6-异或xor">6、异或XOR</h4>
<p>表达式：<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>F</mi><mo>=</mo><mi>X</mi><mo>⊕</mo><mi>Y</mi></mrow><annotation encoding="application/x-tex">F=X\oplus Y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.13889em;">F</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.76666em;vertical-align:-0.08333em;"></span><span class="mord mathdefault" style="margin-right:0.07847em;">X</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span></span><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.22222em;">Y</span></span></span></span></p>
<p>真值表：(奇数个1返回1，偶数个1返回0)</p>
<img src="http://cos.pansis.site/202309111110473.png" alt="image-20230911111000433" style="zoom:50%;" />
<p>逻辑符号：</p>
<img src="http://cos.pansis.site/202309111109481.png" alt="image-20230911110948450" style="zoom:33%;" />
<h4 id="7-同或-xnor">7、同或 XNOR</h4>
<p>表达式：<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi>F</mi><mo>=</mo><mover accent="true"><mrow><mi>X</mi><mo>⊕</mo><mi>Y</mi></mrow><mo stretchy="true">‾</mo></mover><mo>=</mo><mi>X</mi><mo>⊙</mo><mi>Y</mi></mrow><annotation encoding="application/x-tex">F=\overline{X\oplus Y}=X\odot Y</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.13889em;">F</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.9666600000000001em;vertical-align:-0.08333em;"></span><span class="mord overline"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8833300000000001em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathdefault" style="margin-right:0.07847em;">X</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord mathdefault" style="margin-right:0.22222em;">Y</span></span></span><span style="top:-3.80333em;"><span class="pstrut" style="height:3em;"></span><span class="overline-line" style="border-bottom-width:0.04em;"></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.08333em;"><span></span></span></span></span></span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.76666em;vertical-align:-0.08333em;"></span><span class="mord mathdefault" style="margin-right:0.07847em;">X</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">⊙</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span></span><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord mathdefault" style="margin-right:0.22222em;">Y</span></span></span></span></p>
<p>真值表：(奇数个1返回0，偶数个1返回1)</p>
<img src="http://cos.pansis.site/202309111112383.png" alt="image-20230911111200340" style="zoom:50%;" />
<p>逻辑符号：</p>
<img src="http://cos.pansis.site/202309111112904.png" alt="image-20230911111209868" style="zoom:33%;" />
<h4 id="8-汇总">8、汇总</h4>
<img src="http://cos.pansis.site/202309111114219.png" alt="image-20230911111417147" style="zoom:67%;" />
<h2 id="二-逻辑运算律">二、逻辑运算律</h2>
<h4 id="1-基本公式">1、基本公式</h4>
<figure data-type="image" tabindex="1"><img src="http://cos.pansis.site/202309111454991.png" alt="image-20230911145442874" loading="lazy"></figure>
<h4 id="2-运算律">2、运算律</h4>
<p>1、交换律 <img src="http://cos.pansis.site/202309111455976.png" alt="image-20230911145536961" style="zoom: 25%;" /></p>
<p>2、结合律 <img src="http://cos.pansis.site/202309111455655.png" alt="image-20230911145558628" style="zoom:25%;" /></p>
<p>3、分配率 <img src="http://cos.pansis.site/202309111456199.png" alt="image-20230911145628172" style="zoom:25%;" /></p>
<p>4、摩根公式    <img src="http://cos.pansis.site/202309111457298.png" alt="image-20230911145737270" style="zoom: 50%;" /></p>
<p>5、摩根公式推广一</p>
<p>运算形式单一，当变量个数增加时， 摩根定律的仍然适用。</p>
<img src="http://cos.pansis.site/202309142353585.png" alt="image-20230914235334515" style="zoom:33%;" />
<p>6、摩根公式推广二（求反律）</p>
<p>原函数与反函数在结构上的特定关系：</p>
<p>​           如果将原函数中**“与”、“或” 对调**；<strong>0、1对调</strong>；<strong>长非号不变</strong>，保 证原先运算优先级，就可以得到反函数。</p>
<img src="http://cos.pansis.site/202309150000017.png" alt="image-20230915000007965" style="zoom:33%;" />
<p>长非号是指包含有多个变量和 至少一种逻辑运算的非号</p>
<br />
                                            
                                </p>
                            </div>
                            <div class="post_footer">
                                
                                    <div class="meta">
                                        <div class="info"><span class="field tags"><i class="iconfont icon-tag-sm"></i>
                                                
                                                    <a href="https://github.pansis.site/tag/jsjzcyl/" class="article-info">
                                                        计算机组成原理
                                                    </a>
                                                    
                                            </span>
                                        </div>
                                    </div>
                                    
                                        
                            </div>
                        </div>
                        
                            
                                <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
<div id="gitalk-container" style="padding-bottom: 20px;"></div>
<script>
    var pageId = (location.pathname).substring(1, 49) // Ensure uniqueness and length less than 50
    pageId = pageId.endsWith('/') ? pageId.slice(0, -1) : pageId // 以斜杠结尾则去除
    var gitalk = new Gitalk({
        clientID: '9d5eba33618472c44a07',
        clientSecret: '065a85ed04333ceebfc4f01d7ca1674175730339',
        repo: 'fzxl2003.github.io',
        owner: 'fzxl2003',
        admin: ['fzxl2003'],
        id: pageId,
        distractionFreeMode: false  // Facebook-like distraction free mode
    })
    gitalk.render('gitalk-container')
</script>
                                    
                                        
                                                    
                    </div>
                </div>
            </div>
    </div>
    <div class="footer">
    
    <div class="powered_by">
        <a href="https://codeberg.org/kytrun/gridea-theme-one" target="_blank">Theme One,</a>
        <a href="https://open.gridea.dev/" target="_blank">Powered by Gridea&#65281;</a>
    </div>
    
    
        <div class="footer_slogan">
            Powered by <a href="https://github.com/getgridea/gridea" target="_blank">Gridea</a>
        </div>
    
    <div id="back_to_top" class="back_to_top">
        <span>△</span>
    </div>
    
</div>

<script src="https://github.pansis.site/media/scripts/util.js"></script>
        <link rel="stylesheet" href="//unpkg.com/@highlightjs/cdn-assets@11.5.1/styles/default.min.css">
        <script src="//unpkg.com/@highlightjs/cdn-assets@11.5.1/highlight.min.js"></script>
        <script>hljs.highlightAll();</script>
</body>

</html>